<script type="text/javascript">
    $(function () {
        setInterval(function () {
            $("div .ss").fadeOut(500).fadeIn(500);
        }, 800);

        $("#flow_msg_send").click(function () {
            var rows = $("#history-grid").datagrid('getRows');
            var checkedRow = $("#msg-user-grid").datagrid('getChecked');
            if (checkedRow && checkedRow.length > 0) {
                var ygids = '';
                for (var i = 0; i < checkedRow.length; i++) {
                    ygids += checkedRow[i].id + ',';
                }
                if (ygids != '')
                    ygids = ygids.substring(0, ygids.length - 1);

                $.post($.webPath() + "/flow/publish/sendMsg",
                        {'ygidstr': ygids, 'businessNo': $("#businessNo").val(),
                            'opera': rows[0].opera, 'time': rows[0].time,
                            'executionId': '${(processDefinitionId)!}'},
                        function (data) {
                            var obj = eval('(' + data + ')');
                            if (obj.statusCode == '200') {
                                $.messager.show({title: '提示框', msg: obj.message, timeout: 3000, showType: 'slide'});
                            } else
                                $.messager.alert('提示', obj.message, 'info');
                        })
            } else {
                $.messager.alert('提示', "请选择接受短信的人", 'info');
            }
        })
    })
</script>

<img src="${base}/flow/publish/picture?id=${(processDefinitionId)!}" style="position: absolute;left: 7px;top:30px"/>

<#list acList as ac>
<div class="ss"
     style="position: absolute;border: 3px solid red;left:${(ac.getX()+5)!}px;top:${(ac.getY()+28)!}px;width:${(ac.getWidth())!}px;height: ${(ac.getHeight())!}px"></div>
</#list>
<div style="width:45%;height:100%;float: right">
    <div class="easyui-layout" fit="true">
        <div data-options="region:'north',split:true" style="width: 100%;height:275px">
            <table id="history-grid" class="easyui-datagrid" style="position: absolute;top:30px"
                   url="${base}/flow/publish/historyFlow?processInstanceId=${processInstanceId}"
                   pagination="false" rownumbers="true"
                   fitColumns="true" singleSelect="true" fit="true">
                <thead>
                <tr>
                    <th field="opera" width="20">审批人</th>
                    <th field="result" width="20">状态</th>
                    <th field="content" width="20">审批意见</th>
                    <th field="time" width="20">时间</th>
                </tr>
                </thead>
            </table>
        </div>
        <div id="msg_user_content" data-options="region:'center'">
            <input type="hidden" id="businessNo" value=${(businessNo)!}/>

            <div id="flowMsgToolBar" style="height:auto">
                <div class="PTools">
                    <ul class="niu">
                        <li><a id="flow_msg_send" href="javascript:void(0);" class="start" plain="true">短信提醒</a></li>
                    </ul>
                </div>
            </div>
            <table id="msg-user-grid" class="easyui-datagrid" style="position: absolute;top:30px"
                   url="${base}/flow/publish/msgUser?processInstanceId=${processInstanceId}"
                   pagination="false" rownumbers="true" toolbar="#flowMsgToolBar"
                   fitColumns="true" singleSelect="false" fit="true" selectOnCheck="true">
                <thead>
                <tr>
                    <th data-options="checkbox:true,width:30"></th>
                    <th data-options="field:'xm',align:'left',width:70">姓名</th>
                    <th data-options="field:'zgjg_qc',align:'left',width:170">主管机构</th>
                    <th data-options="field:'zygw_mc',align:'center',resizable:true,width:100">主要岗位</th>
                    <th data-options="field:'zssj_xm',align:'left',align:'left',width:70">直属上级</th>
                    <th data-options="field:'dhhm',align:'center',width:100">电话号码</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>